﻿import QtQuick 2.6
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

Button {
    property alias icon: icon.source
    property color iconColor: "#dcdcdc"
    property color iconHoveredBgColor: "#357ac4"
    property color iconPressedBgColor: "#357ac4"
    property color iconBgColor: "transparent"

    id: control
    background: Rectangle
                {
                    radius: 3;
                    color: control.hovered ? (control.pressed ? iconHoveredBgColor : iconPressedBgColor) : iconBgColor;
                }

    contentItem: Item {
        IconFont {
            id: icon
            width: 12
            height: 12
            anchors.fill: parent
            color: iconColor
        }
    }
}
